package cn.demo.service1.client;

import cn.demo.service1.controller.Service1Controller;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

// 服务引用Adapter
@FeignClient(name = "service0", fallbackFactory = Service0FallbackFactory.class)
public interface Service0Client {

    @RequestMapping(method = RequestMethod.GET, path = "user/{userId}/{sleepSec}")
    String user(@PathVariable("userId") String userId, @PathVariable("sleepSec") int sleepSec);

    @RequestMapping(method = RequestMethod.GET, path = "test" )
    String test(Service1Controller.User user);

}
